package com.mao.service.store;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.mao.model.store.Store;
import com.mao.model.user.User;
import com.mao.model.user.UserVO;

@Transactional(rollbackFor=Exception.class,propagation=Propagation.REQUIRED)
public interface IUserService<T>{
	
	public User getUserById(long id);
	
	public User login(String loginName, String password);
	
	public Store getStoreofUser(Long storeId);
	
	public List<User> getUsersOfStore(UserVO userVO, Integer page, Integer rows);
	
	public int getUsersCountOfStore(UserVO userVO, Integer page, Integer rows);
	
	public void saveUser(User user);
	
	public void updateUser(User user);
	
	public boolean isHasChildren(Long id);
	
	public void deleteUser(Long id);
	
	public boolean isLoginNameUsed(String loginName);
	

}
